package main

import (
	"edata-hub/pkg/server"
	"flag"
	"log"
)

func main() {
	var ip string
	flag.StringVar(&ip, "ip", "172.16.124.117", "The path of the conf file")
	var confPath string
	flag.StringVar(&confPath, "confPath", "configs/application.yml", "The path of the conf file")
	flag.Parse()
	config, _ := server.ReadConfig(confPath)
	log.Printf("INFO running as worker")
	config.WorkerConfig.Ip = ip
	worker := server.Worker{
		Config: config,
	}
	worker.StartServer()
}
